using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._GeocodingTools._Legacy
{
    /// <summary>
    /// <para>Create Address Locator</para>
    /// <para>Creates an address locator. The address locator can be used to find the location of an address, geocode a table of addresses, or get the address of a point location.</para>
    /// <para>创建地址定位器。地址定位器可用于查找地址的位置、对地址表进行地理编码或获取点位置的地址。</para>
    /// </summary>    
    [DisplayName("Create Address Locator")]
    public class CreateAddressLocator : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateAddressLocator()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_address_locator_style">
        /// <para>Address Locator Style</para>
        /// <para><xdoc>
        ///   <para>The address locator style on which to base the new address locator.</para>
        ///   <bulletList>
        ///     <bullet_item>US Address-Dual Ranges—Use when the reference data is a line feature class that contains house number ranges on both sides of a street segment, and you want to search for an address on a specific side of the street or a street intersection.</bullet_item><para/>
        ///     <bullet_item>US Address-One Range—Use when the reference data is a line feature class with one house number range for each road segment, and you want to search for an address (where side is not needed) or a street intersection.</bullet_item><para/>
        ///     <bullet_item>US Address-Single House—Use when the reference data is a point or polygon feature class in which each feature represents a single address, and you want to search for an exact address for a parcel, building, or address point.</bullet_item><para/>
        ///     <bullet_item>US Address-Single House Subadress—Use when the reference data is a point or polygon feature class in which each feature represents a single address with optional subaddress elements, and you want to search for apartment units, townhouses, duplexes, or stores in a shopping plaza.</bullet_item><para/>
        ///     <bullet_item>US Address-Street Name—Use when the reference data is a line feature class, and you want to search for addresses using only the street name. Address range information is not required.</bullet_item><para/>
        ///     <bullet_item>US Address-City State—Use when the reference data is a point or polygon feature class, and you want to search for a specific city in a state.</bullet_item><para/>
        ///     <bullet_item>US Address-ZIP 5 Digit—Use when the reference data is a point or polygon feature class in which each feature represents a ZIP Code centroid or geographic area, and you want to search for a specific ZIP Code location.</bullet_item><para/>
        ///     <bullet_item>General-Gazetteer—Use when the reference data is a point or polygon feature class in which each feature represents any unique feature, and you want to search for a place-name, landmark, water meter, or any unique value.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>新地址定位器所基于的地址定位器样式。</para>
        ///   <bulletList>
        ///     <bullet_item>US Address-Dual Ranges - 当参考数据是包含街道段两侧门牌号范围的线要素类，并且您想要搜索街道特定一侧或街道交叉口的地址时，请使用。</bullet_item><para/>
        ///     <bullet_item>US Address-One Range - 当参考数据是具有每个路段一个门牌号范围的线要素类，并且您想要搜索地址（不需要边）或街道交叉口时使用。</bullet_item><para/>
        ///     <bullet_item>US Address-Single House - 当参考数据为点或面要素类，其中每个要素代表一个地址，并且您想要搜索宗地、建筑物或地址点的确切地址时使用。</bullet_item><para/>
        ///     <bullet_item>US Address-Single House Subadress - 当参考数据为点要素类或面要素类时使用，其中每个要素表示具有可选子地址元素的单个地址，并且您希望在购物广场中搜索公寓单元、联排别墅、复式公寓或商店。</bullet_item><para/>
        ///     <bullet_item>美国地址-街道名称 - 当参考数据为线要素类，并且您希望仅使用街道名称搜索地址时使用。地址范围信息不是必需的。</bullet_item><para/>
        ///     <bullet_item>US Address-City State - 当参考数据为点或面要素类，并且您想要搜索州中的特定城市时使用。</bullet_item><para/>
        ///     <bullet_item>US Address-ZIP 5 Digit - 当参考数据是点或面要素类时使用，其中每个要素表示邮政编码质心或地理区域，并且您想要搜索特定的邮政编码位置。</bullet_item><para/>
        ///     <bullet_item>General-Gazetteer - 当参考数据是点或面要素类时使用，其中每个要素表示任何唯一要素，并且您想要搜索地名、地标、水表或任何唯一值。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_in_reference_data">
        /// <para>Reference Data</para>
        /// <para><xdoc>
        ///   <para>The reference data feature classes and tables, along with their roles, to be used by the address locator.</para>
        ///   <bulletList>
        ///     <bullet_item>Primary table—Defines the primary reference dataset feature class for a locator, such as a street centerline feature class. This is a required table.</bullet_item><para/>
        ///     <bullet_item>Alternate City Name table—Defines an alternate city name table that contains alternate names for the city or place-name. The table is required to have a JoinID that can be used to join to the primary table. This table is optional.</bullet_item><para/>
        ///     <bullet_item>Alternate Name table—Defines an alternate street name table that contains alternate names for the street or point features. The table is required to have a JoinID that can be used to join to the primary table. This table is optional.</bullet_item><para/>
        ///     <bullet_item>Alias table—Defines a place-name alias table that contains place-names and actual addresses for the names. Users can find the location using either the place-name, such as Field Museum, or the address, such as 1400 S Lakeshore Drive Chicago, IL 60605. This table is optional.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>Feature classes and tables represented as services are not supported data types for use as reference data.</para>
        ///   <para>Custom locator styles or locator styles provided by third parties may define a different set of roles for reference datasets.</para>
        ///   <para>When creating a locator with reference data that contains millions of features, you must have at least three to four times the size of the data in free disk space on the drive containing your temp directory, as files used to build the locator are written to this location before the locator is copied to the output location. If you do not have enough disk space, the tool will fail when it runs out of space. Also, when creating large locators, your machine must have enough RAM to handle large memory-intensive processes.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要由地址定位器使用的参考数据要素类和表及其角色。</para>
        ///   <bulletList>
        ///     <bullet_item>主表 - 定义定位器的主参考数据集要素类，例如街道中心线要素类。这是必需的表。</bullet_item><para/>
        ///     <bullet_item>备用城市名称表 （Alternate City Name） 表格 - 定义包含城市或地名的备用名称的备用城市名称表。该表必须具有可用于联接到主表的 JoinID。此表是可选的。</bullet_item><para/>
        ///     <bullet_item>备用名称表 - 定义包含街道或点要素的备用名称的备用街道名称表。该表必须具有可用于联接到主表的 JoinID。此表是可选的。</bullet_item><para/>
        ///     <bullet_item>别名表 - 定义包含地名和地名的实际地址的地名别名表。用户可以使用地名（如菲尔德博物馆）或地址（如 1400 S Lakeshore Drive Chicago， IL 60605）找到该位置。此表是可选的。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>表示为服务的要素类和表不支持用作参考数据的数据类型。</para>
        ///   <para>自定义定位器样式或第三方提供的定位器样式可能会为参考数据集定义一组不同的角色。</para>
        ///   <para>使用包含数百万个要素的参考数据创建定位器时，包含临时目录的驱动器上的可用磁盘空间中的数据大小必须至少是其大小的三到四倍，因为在将定位器复制到输出位置之前，用于构建定位器的文件将写入此位置。如果磁盘空间不足，则该工具将在空间不足时失败。此外，在创建大型定位器时，计算机必须具有足够的 RAM 来处理大型内存密集型进程。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_in_field_map">
        /// <para>Field Map</para>
        /// <para>The mapping of reference data fields used by the address locator style to fields in the reference datasets. Fields with an asterisk (*) next to their names are required by the address locator style.</para>
        /// <para>地址定位器样式使用的参考数据字段到参考数据集中字段的映射。名称旁边带有星号 （*） 的字段是地址定位器样式所必需的字段。</para>
        /// </param>
        /// <param name="_out_address_locator">
        /// <para>Output Address Locator</para>
        /// <para>The locator to create in a file folder. Saving the locator to a file folder allows you to take advantage of performance improvements, multithreading capabilities, and suggestions support. Once the locator is created, additional properties and options can be modified in the locator's settings.</para>
        /// <para>要在文件夹中创建的定位器。通过将定位器保存到文件夹，您可以利用性能改进、多线程功能和建议支持。创建定位器后，可以在定位器的设置中修改其他属性和选项。</para>
        /// </param>
        public CreateAddressLocator(object _in_address_locator_style, object _in_reference_data, object _in_field_map, object _out_address_locator)
        {
            this._in_address_locator_style = _in_address_locator_style;
            this._in_reference_data = _in_reference_data;
            this._in_field_map = _in_field_map;
            this._out_address_locator = _out_address_locator;
        }
        public override string ToolboxName => "Geocoding Tools";

        public override string ToolName => "Create Address Locator";

        public override string CallName => "geocoding.CreateAddressLocator";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_address_locator_style, _in_reference_data, _in_field_map, _out_address_locator, _config_keyword, _enable_suggestions.GetGPValue()];

        /// <summary>
        /// <para>Address Locator Style</para>
        /// <para><xdoc>
        ///   <para>The address locator style on which to base the new address locator.</para>
        ///   <bulletList>
        ///     <bullet_item>US Address-Dual Ranges—Use when the reference data is a line feature class that contains house number ranges on both sides of a street segment, and you want to search for an address on a specific side of the street or a street intersection.</bullet_item><para/>
        ///     <bullet_item>US Address-One Range—Use when the reference data is a line feature class with one house number range for each road segment, and you want to search for an address (where side is not needed) or a street intersection.</bullet_item><para/>
        ///     <bullet_item>US Address-Single House—Use when the reference data is a point or polygon feature class in which each feature represents a single address, and you want to search for an exact address for a parcel, building, or address point.</bullet_item><para/>
        ///     <bullet_item>US Address-Single House Subadress—Use when the reference data is a point or polygon feature class in which each feature represents a single address with optional subaddress elements, and you want to search for apartment units, townhouses, duplexes, or stores in a shopping plaza.</bullet_item><para/>
        ///     <bullet_item>US Address-Street Name—Use when the reference data is a line feature class, and you want to search for addresses using only the street name. Address range information is not required.</bullet_item><para/>
        ///     <bullet_item>US Address-City State—Use when the reference data is a point or polygon feature class, and you want to search for a specific city in a state.</bullet_item><para/>
        ///     <bullet_item>US Address-ZIP 5 Digit—Use when the reference data is a point or polygon feature class in which each feature represents a ZIP Code centroid or geographic area, and you want to search for a specific ZIP Code location.</bullet_item><para/>
        ///     <bullet_item>General-Gazetteer—Use when the reference data is a point or polygon feature class in which each feature represents any unique feature, and you want to search for a place-name, landmark, water meter, or any unique value.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>新地址定位器所基于的地址定位器样式。</para>
        ///   <bulletList>
        ///     <bullet_item>US Address-Dual Ranges - 当参考数据是包含街道段两侧门牌号范围的线要素类，并且您想要搜索街道特定一侧或街道交叉口的地址时，请使用。</bullet_item><para/>
        ///     <bullet_item>US Address-One Range - 当参考数据是具有每个路段一个门牌号范围的线要素类，并且您想要搜索地址（不需要边）或街道交叉口时使用。</bullet_item><para/>
        ///     <bullet_item>US Address-Single House - 当参考数据为点或面要素类，其中每个要素代表一个地址，并且您想要搜索宗地、建筑物或地址点的确切地址时使用。</bullet_item><para/>
        ///     <bullet_item>US Address-Single House Subadress - 当参考数据为点要素类或面要素类时使用，其中每个要素表示具有可选子地址元素的单个地址，并且您希望在购物广场中搜索公寓单元、联排别墅、复式公寓或商店。</bullet_item><para/>
        ///     <bullet_item>美国地址-街道名称 - 当参考数据为线要素类，并且您希望仅使用街道名称搜索地址时使用。地址范围信息不是必需的。</bullet_item><para/>
        ///     <bullet_item>US Address-City State - 当参考数据为点或面要素类，并且您想要搜索州中的特定城市时使用。</bullet_item><para/>
        ///     <bullet_item>US Address-ZIP 5 Digit - 当参考数据是点或面要素类时使用，其中每个要素表示邮政编码质心或地理区域，并且您想要搜索特定的邮政编码位置。</bullet_item><para/>
        ///     <bullet_item>General-Gazetteer - 当参考数据是点或面要素类时使用，其中每个要素表示任何唯一要素，并且您想要搜索地名、地标、水表或任何唯一值。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Address Locator Style")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_address_locator_style { get; set; }


        /// <summary>
        /// <para>Reference Data</para>
        /// <para><xdoc>
        ///   <para>The reference data feature classes and tables, along with their roles, to be used by the address locator.</para>
        ///   <bulletList>
        ///     <bullet_item>Primary table—Defines the primary reference dataset feature class for a locator, such as a street centerline feature class. This is a required table.</bullet_item><para/>
        ///     <bullet_item>Alternate City Name table—Defines an alternate city name table that contains alternate names for the city or place-name. The table is required to have a JoinID that can be used to join to the primary table. This table is optional.</bullet_item><para/>
        ///     <bullet_item>Alternate Name table—Defines an alternate street name table that contains alternate names for the street or point features. The table is required to have a JoinID that can be used to join to the primary table. This table is optional.</bullet_item><para/>
        ///     <bullet_item>Alias table—Defines a place-name alias table that contains place-names and actual addresses for the names. Users can find the location using either the place-name, such as Field Museum, or the address, such as 1400 S Lakeshore Drive Chicago, IL 60605. This table is optional.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>Feature classes and tables represented as services are not supported data types for use as reference data.</para>
        ///   <para>Custom locator styles or locator styles provided by third parties may define a different set of roles for reference datasets.</para>
        ///   <para>When creating a locator with reference data that contains millions of features, you must have at least three to four times the size of the data in free disk space on the drive containing your temp directory, as files used to build the locator are written to this location before the locator is copied to the output location. If you do not have enough disk space, the tool will fail when it runs out of space. Also, when creating large locators, your machine must have enough RAM to handle large memory-intensive processes.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要由地址定位器使用的参考数据要素类和表及其角色。</para>
        ///   <bulletList>
        ///     <bullet_item>主表 - 定义定位器的主参考数据集要素类，例如街道中心线要素类。这是必需的表。</bullet_item><para/>
        ///     <bullet_item>备用城市名称表 （Alternate City Name） 表格 - 定义包含城市或地名的备用名称的备用城市名称表。该表必须具有可用于联接到主表的 JoinID。此表是可选的。</bullet_item><para/>
        ///     <bullet_item>备用名称表 - 定义包含街道或点要素的备用名称的备用街道名称表。该表必须具有可用于联接到主表的 JoinID。此表是可选的。</bullet_item><para/>
        ///     <bullet_item>别名表 - 定义包含地名和地名的实际地址的地名别名表。用户可以使用地名（如菲尔德博物馆）或地址（如 1400 S Lakeshore Drive Chicago， IL 60605）找到该位置。此表是可选的。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>表示为服务的要素类和表不支持用作参考数据的数据类型。</para>
        ///   <para>自定义定位器样式或第三方提供的定位器样式可能会为参考数据集定义一组不同的角色。</para>
        ///   <para>使用包含数百万个要素的参考数据创建定位器时，包含临时目录的驱动器上的可用磁盘空间中的数据大小必须至少是其大小的三到四倍，因为在将定位器复制到输出位置之前，用于构建定位器的文件将写入此位置。如果磁盘空间不足，则该工具将在空间不足时失败。此外，在创建大型定位器时，计算机必须具有足够的 RAM 来处理大型内存密集型进程。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Reference Data")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_reference_data { get; set; }


        /// <summary>
        /// <para>Field Map</para>
        /// <para>The mapping of reference data fields used by the address locator style to fields in the reference datasets. Fields with an asterisk (*) next to their names are required by the address locator style.</para>
        /// <para>地址定位器样式使用的参考数据字段到参考数据集中字段的映射。名称旁边带有星号 （*） 的字段是地址定位器样式所必需的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Field Map")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_field_map { get; set; }


        /// <summary>
        /// <para>Output Address Locator</para>
        /// <para>The locator to create in a file folder. Saving the locator to a file folder allows you to take advantage of performance improvements, multithreading capabilities, and suggestions support. Once the locator is created, additional properties and options can be modified in the locator's settings.</para>
        /// <para>要在文件夹中创建的定位器。通过将定位器保存到文件夹，您可以利用性能改进、多线程功能和建议支持。创建定位器后，可以在定位器的设置中修改其他属性和选项。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Address Locator")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_address_locator { get; set; }


        /// <summary>
        /// <para>Configuration keyword</para>
        /// <para>This parameter has no effect in ArcGIS Pro. It remains to support backward compatibility.</para>
        /// <para>此参数在 ArcGIS Pro 中不起作用。它仍然支持向后兼容性。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Configuration keyword")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _config_keyword { get; set; } = null;


        /// <summary>
        /// <para>Enable suggestions</para>
        /// <para><xdoc>
        ///   <para>Specifies whether character-by-character autocomplete suggestions will be generated for user input in a client application. This capability facilitates the interactive search user experience by reducing the number of characters that must be typed before a suggested match is obtained. The idea is that a client application can provide a list of suggestions that is updated with each character entered by a user until the place they are looking for is returned in the list.</para>
        ///   <para>Only the locator styles provided by Esri can be used to build locators with suggestions enabled. The suggestion functionality is only exposed when such a locator is shared to your portal.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Suggestions are enabled for the locator.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Suggestions are not enabled for the locator. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否为客户端应用程序中的用户输入生成逐字符自动完成建议。此功能通过减少在获取建议的匹配项之前必须键入的字符数来促进交互式搜索用户体验。这个想法是，客户端应用程序可以提供一个建议列表，该列表会随着用户输入的每个字符而更新，直到列表中返回他们要查找的位置。</para>
        ///   <para>只有 Esri 提供的定位器样式可用于构建启用了建议的定位器。仅当将此类定位器共享到您的门户时，才会显示建议功能。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 为定位器启用建议。</bullet_item><para/>
        ///     <bullet_item>未选中 - 未为定位器启用建议。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Enable suggestions")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _enable_suggestions_value _enable_suggestions { get; set; } = _enable_suggestions_value._false;

        public enum _enable_suggestions_value
        {
            /// <summary>
            /// <para>ENABLED</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ENABLED")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DISABLED</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DISABLED")]
            [GPEnumValue("false")]
            _false,

        }

        public CreateAddressLocator SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}